<template>
    <div id="formScrollbar" class="test-form">
        <parser v-if="formConf.name" :key="key2" :preview="true" :form-conf="formConf" @submit="sumbitForm" />
    </div>
</template>

<script>
import Parser from '../Parser'

// 若parser是通过安装npm方式集成到项目中的，使用此行引入
// import Parser from 'form-gen-parser'

export default {
    components: {
        Parser,
    },
    props: {},
    data() {
        return {
            key2: +new Date(),
            formConf: {},
        }
    },
    computed: {},
    watch: {},
    created() {},
    mounted() {
        this.formConf = JSON.parse(localStorage.getItem('formData'))
        // 更新表单
        this.key2 = +new Date()
    },
    methods: {
        sumbitForm(data) {},
    },
}
</script>

<style lang="scss" scoped></style>
